package com.nbpt;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ListView;
import android.widget.ArrayAdapter;
import android.widget.Toast;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class shezhi extends Activity {
    private ListView listView;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.shezhi);

        listView = findViewById(R.id.listview);

        listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
            @Override
            public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {
                if (i==0) {
                    Toast.makeText(shezhi.this, "点击了个人信息", Toast.LENGTH_SHORT).show();

                    Intent intent = new Intent(shezhi.this,gerenxinxi.class);
                    startActivityForResult(intent,0);

                }
                if (i==1) {
                    Toast.makeText(shezhi.this, "点击了用户昵称", Toast.LENGTH_SHORT).show();
                    Intent intent = new Intent(shezhi.this,yonghunichen.class);
                    startActivityForResult(intent,0);
                }
                if (i==2) {
                    Toast.makeText(shezhi.this, "点击了软件版本", Toast.LENGTH_SHORT).show();
                }
                if (i==3) {
                    Toast.makeText(shezhi.this, "点击了联系我们", Toast.LENGTH_SHORT).show();
                    Intent intent = new Intent(shezhi.this,lianxiwomen.class);
                    startActivityForResult(intent,0);
                }
            }
        });


        //ArrayAdapter<String> adapter = new ArrayAdapter<String>(this,android.R.layout.simple_dropdown_item_1line,userName);
        //listView.setAdapter(adapter);

    }
}
